{#**
*
* 功能描述（搜索模板）
*
* @author suoya <jlusuoya@gmail.com>
* @version 1
*#}
{#if !isset($s_basic)#}{#$s_basic=[]#}{#/if#}
{#if !isset($s_vdate)#}{#$s_vdate=[]#}{#/if#}
{#if !isset($s_checkbox)#}{#$s_checkbox=[]#}{#/if#}
<div class="search">
    <div class="searchTitle">
        搜索
    </div>
    <script language="javascript" type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
    <form id="searchForm" action="" method="POST" onsubmit="$(this).attr('action', location.href.split('&')[0]);
            form2url($(this));
            return false">
        <div class="searchBar">
            <select name="key" id="s_key">
                <option value="">请选择搜索字段</option>
                {#foreach $s_keys as $k=>$i#}<option value="{#$k#}">{#$i#}</option>{#/foreach#}
            </select>
            <input type="text" name="keyword" id="s_keyword" value="" class="input_text" />
            {#foreach $s_checkbox as $sk => $sv #}
                {#if $sk == 'br'#}
                    </div>
                    <div class="searchBar">
                {#else#}
                    <input type="checkbox" name="{#$sk#}" value="{#$sv[0]#}" {#if ${#$sk#} ==  $sv[0]#} checked="checked"{#/if#} />{#$sv[1]#}
                {#/if#}
            {#/foreach#}
        </div>
                {#if isset($s_vdate) and ($s_vdate|@count neq 0) #}
        <div class="searchBar">
            {#foreach $s_vdate as $sk => $sv#}
                {#if $sk == 'br'#}
                    </div>
                    <div class="searchBar">
                {#else#}
                    <label class="date_search_label">{#$sv#}：</label><input class="input_text" id="d11" name="{#$sk#}" type="text" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="{#${#$sk#}#}" readonly/>
                {#/if#}
            {#/foreach#}
        </div>
                {#/if#}
            {#foreach $s_basic as $sk => $sv #}
                <div class="searchBar">
                    <input type="hidden" name="{#$sk#}" id="s_{#$sk#}" value="" />
                    <script>$("#s_{#$sk#}").val('{#${#$sk#}#}');</script>
                    <label class="type_search_label">{#$sv[1]#}：</label>
                    <div class="typeDiv">
                        <a href="#" {#if ${#$sk#} == $sv[0]#} class="active"{#/if#} onclick="search_select('#s_{#$sk#}','{#$sv[0]#}','#searchForm');">全部</a> 
                        {#foreach $sv[2] as $k=>$v#}<a href="#" {#if ${#$sk#} == $k#} class="active"{#/if#} onclick="search_select('#s_{#$sk#}','{#$k#}','#searchForm');">{#$v#}</a> {#/foreach#}
                    </div>
                </div>
            {#/foreach#}
        <div class="buttonBar">
            <input type="submit" class="button align_right" value="查询"/>
        </div>
    </form>
    <script>
        $("#s_key").val('{#$key#}');
        $("#s_keyword").val('{#$keyword#}');
    </script>
</div>
